<script setup lang="ts">
import { PageWrapper } from '@/components/Application'
import { date, datehour, datehourminute, datetime, gt, now, parse, time, today, tomorrow, year, yearmonth, years, yesterday } from '@/utils/date'
import ExtraForm from '../system/dict/components/ExtraForm.vue'

const model = ref({
  extra: JSON.stringify({ type: 'primary' }),
})

console.log('parse()', parse('2022-01-01').format('YYYY-MM-DD HH:mm:ss'))
console.log('now()', now())
console.log('today()', today())
console.log('yesterday()', yesterday())
console.log('tomorrow()', tomorrow())
console.log('datetime()', datetime())
console.log('date()', date())
console.log('time()', time())
console.log('datehour()', datehour())
console.log('datehourminute()', datehourminute())
console.log('year()', year())
console.log('yearmonth()', yearmonth())
console.log('years()', years(5))
console.log('gt()', gt('2026-01-01'))
</script>

<template>
  <PageWrapper>
    <div>
      {{ model }}
      <ExtraForm v-model:value="model.extra" />
      <n-input v-model:value="model.extra" type="textarea" />
      <n-tag type="primary">
        Tag
      </n-tag>
    </div>
  </PageWrapper>
</template>

<style scoped>

</style>
